perm filename LOOKUP.SPE[1,JMC] blob sn#005280 filedate 1970-08-31 generic text, type T, neo UTF8
00100	SPECIFICATIONS FOR PROPOSED LOOKUP PROGRAM
00200	
00300	by John McCArthy
00400	
00500		We need a system program for looking up
00600	entries in files.  For example,
00700	
00800		LOOK 'JMC' DIREC
00900	
01000	might print the name associated with those initials.
01100	
01200		Consider the following proposed features:
01300	
01400		1. The syntax is %LOOK <key> <file>, and the result
01500	is an item associated with %<key>% in the file %<file>.
01600	Either %<key>% or %<file>% may itself be the result of a lookup
01700	or other operation for manipulating strings.
01800	
01900		2. In the simplest case, the result of the lookup is a
02000	string, but this need not always be the case.  Other possibilities
02100	are binary data, a file 
02200	(represented either by its name (which is a string) or by a
02300	pointer of some kind).
02400	
02500		3. Programs should be able to do LOOKUPs directly
02600	by UUO and not merely by pseudo-teletype.
02700	
02800		4. Facilities are required for creating LOOKUP files.  If
02900	they are to be efficient, the keys should
03000	be hash-coded.  Perhaps, all we need is a program theat creates
03100	a suitable hash-coded file from an ordinary
03200	text file produced by SOS.  
03300	
03400		5. It should be possibble to look into the same
03500	file in several ways.  For example, lookups in the
03600	directory file should be on initials or on name, and one
03700	should also be able to find the collection of entries with given
03800	properties.